<template>
  <section class="my-orderdetail">
    <div class="address flex flex-middle">
        <van-icon
            class="icon"
            name="location-o"
        />
        <div class="info-wrap">
            <div>
                <span class="name">张云</span><span class="phone">13821542414</span>
            </div>
            <div class="add mt15">武汉大学阳光校区男生公寓10栋1002</div>
        </div>
        <div class="phone-icon" @click="callPhone">
            <image :src="phoneIcon" mode="widthFix" class="phone-icon__img"/>
        </div>
    </div>
    <div class="commodity">
      <div class="content">
        <van-row>
          <van-col span="9">
            <img
              src="http://c.hiphotos.baidu.com/baike/c0%3Dbaike150%2C5%2C5%2C150%2C50/sign=bbb98e7431dbb6fd3156ed74684dc07d/42a98226cffc1e1760e1b6be4290f603728de9e7.jpg"
              alt=""
            >
          </van-col>
          <van-col
            span="15"
            class="left"
          >
            <div class="title van-multi-ellipsis--l2">
              蓝色无线蓝牙耳机产品名称两行字有
              两行字商品名称...
            </div>
            <div class="mt15 desc">
              蓝色 商品属性
            </div>
            <div class="flex mt10 flex-between">
              <div class="price">￥280.00</div>
              <div class="num">x1</div>
            </div>
          </van-col>
        </van-row>
      </div>
    </div>
    <div class="info">
      <div class="item flex flex-between">
        <span class="left">订单状态</span><span class="right">代送货</span>
      </div>
      <div class="item flex flex-between">
        <span class="left">备注</span><span class="right">备注这是一条备注这是备注</span>
      </div>
      <div class="item flex flex-between">
        <span class="left">下单时间</span><span class="right">2019-02-25</span>
      </div>
      <div class="item flex flex-between">
        <span class="left">订单编号</span><span class="right">12164636464</span>
      </div>
      <div class="item flex flex-between">
        <span class="left">订单金额</span><span class="price">￥280.00</span>
      </div>
      <div class="item flex flex-between">
        <span class="left">运费</span><span class="price">￥280.00</span>
      </div>
    </div>
    <button class="footer-btn">送货完成</button>
  </section>
</template>
<script>
const phoneIcon = require('@static/images/phone-icon.png');
export default {
  data() {
    return {
      topIndex: 0,
      topTab: ['商城订单', '跑腿订单'],
      activeShop: 0,//商城下tab
      shopTabs: ['全部', '待支付', '待收货', '已完成', '退款售后'],
      activeRun: 1,
      phoneIcon
    };
  },
  methods: {
    routerTo(id) {
      wx.navigateTo({ url: '../orderdetail/index?id=' + id });
    },
    callPhone () {
        wx.makePhoneCall({
            phoneNumber: '158XXXXXXXX',
        });
    }
  }
};
</script>
<style lang="scss" scoped>
.my-orderdetail {
    .info-wrap {
        flex: 1;
        border-right: 1px solid $grey-border-color;
    }
  .address {
    margin: 10px 15px;
    padding: 20px 15px;
    background: white;
    border-radius: 5px;
    .icon {
      width: 25px;
      height: 25px;
      text-align: center;
      line-height: 28px;
      border-radius: 50%;
      background: $theme-color;
      color: #fff;
      margin-right: 15px;
    }
    .name {
      font-size: 15px;
      font-family: PingFang;
      font-weight: bold;
      color: rgba(46, 46, 46, 1);
      margin-right: 15px;
    }
    .phone {
      font-size: 12px;
      font-family: PingFang;
      font-weight: 500;
      color: rgba(193, 196, 201, 1);
    }
    .add {
      font-size: 12px;
      font-family: PingFang;
      font-weight: 500;
      color: rgba(64, 68, 76, 1);
      line-height: 21px;
      margin-top: 10px;
    }
  }
  .commodity {
    background: white;
    margin: 15px;
    padding: 15px;
    border-radius: 5px;
    .status {
      text-align: right;
      font-size: 15px;
      font-family: PingFang;
      font-weight: 500;
      color: rgba(59, 184, 253, 1);
      line-height: 13px;
    }
    .content {
      img {
        width: 100px;
        height: 100px;
        border-radius: 4px;
        border: 1px solid #3bb8fd;
      }
      .left {
        .title {
          font-size: 14px;
          font-family: PingFang;
          font-weight: 500;
          color: rgba(46, 46, 46, 1);
          line-height: 24px;
        }
        .desc {
          font-size: 12px;
          font-family: PingFang;
          font-weight: 500;
          color: rgba(193, 196, 201, 1);
        }
        .price {
          font-size: 15px;
          font-family: DIN;
          font-weight: 500;
          color: rgba(255, 156, 0, 1);
          line-height: 22px;
        }
        .num {
          font-size: 15px;
          font-family: PingFang;
          font-weight: 500;
          color: rgba(46, 46, 46, 1);
          line-height: 21px;
        }
      }
    }
  }
  .phone-icon {
      width: 50px;
      text-align: center;
      .phone-icon__img {
          width: 16px;
      }
  }
  .info {
    margin: 15px;
    padding: 5px 15px;
    background: rgba(255, 255, 255, 1);
    border-radius: 5px;
    .item {
      border-bottom: 1px solid #f7f7f7;
      padding: 15px 0;
    }
    .info .item:nth-last-child(1) {
        border: none;
    }
    .left {
      font-size: 12px;
      font-family: PingFang;
      font-weight: 500;
      color: rgba(193, 196, 201, 1);
    }
    .right {
      font-size: 13px;
      font-family: PingFang;
      font-weight: 500;
      color: rgba(46, 46, 46, 1);
    }
    .price {
      font-size: 13px;
      font-family: DIN;
      font-weight: 500;
      color: rgba(255, 156, 0, 1);
      line-height: 22px;
    }
  }
  .footer-btn {
        width: 345px;
        height: 44px;
        border-radius: 5px;
        font-size: 18px;
        margin: 30px 15px;
        color: #fff;
        background: $theme-color;
  }
}
</style>
<style lang="scss">
page {
  background: #f7f7f7;
}
</style>